package java_reflect;

/**
 * @author 美女
 * @date 2022/03/25 14:32
 **/
public class Student extends Person{
    private String name;
    public int age;
    String country;
    public Student(){
        System.out.println("Non  Parameter");
    }
    Student(String name) {
        System.out.println("One  Parameter");
        this.name = name;
    }
    public Student(String name, int age, String country) {
        System.out.println("three  Parameters");
        this.name = name;
        this.age = age;
        this.country = country;
    }
    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", country='" + country + '\'' +
                '}';
    }
    private void fun(){
        System.out.println("Student类的fun方法，private权限");
    }
    public int getAge(int num){
        System.out.println("Student类的getAge方法，public权限");
        return this.age+num;
    }
    private static void staticFunc(String test){
        System.out.println(test);
        System.out.println("Student类的静态方法");
    }
}
